// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'BOMBVC' 

0006: 8@ = 0 // @ = int 
0006: 9@ = 0 // @ = int


:BOMBVC_45
wait 0 



04B8: get_weapon_data_from_actor $PLAYER_ACTOR slot 3 weapon 5@ ammo 6@ model 7@
   
//045A: text_draw_1number 100.0 100.0 'NUMBER' 8@   
 
if or
0039:   5@ == 13 // @ == int
0039:   5@ == 12 // @ == int 
jf @BOMBVC_45

if  
0019:   6@ > 0 // @ > int  
jf @BOMBVC_45


if
00DF:   actor $PLAYER_ACTOR in_any_car
then
0006: 9@ = 1 // @ = int
else
    if
    0039:  9@ == 1 // @ == int
    then  
        0006: 9@ = 0 // @ = int 
        if   
        8045: not 8@ == 6@
        then
            01B1: give_player $PLAYER_CHAR weapon 14 ammo 1 // Load the weapon model before using this 
            01B1: give_player $PLAYER_CHAR weapon 5@ ammo 8@ // Load the weapon model before using this      
        end 
    else
        0085: 8@ = 6@ // @ = @ int
    end 
end


if  
0019:   8@ > 0 // @ > int  
jf @BOMBVC_45 
 


if and
00E1:  player 0 pressed_button 5
00E1:  player 0 pressed_button 7
then

else
    if and
    80E1:  not player 0 pressed_button 5
    80E1:  not player 0 pressed_button 7
    then
    
    else
        jump @BOMBVC_45 
    end
end

if and
   Player.Defined($PLAYER_CHAR)
   Actor.Driving($PLAYER_ACTOR)
00E1:   player 0 pressed_button 17
jf @BOMBVC_45

       
03C0: 10@ = actor $player_actor car_no_save

if or
0137:   car 10@ model == 6137
0137:   car 10@ model == 6138
0137:   car 10@ model == 156
then
    jump @BOMBVC_45
end  



if and
0256:   player $player_char defined 
03EE:   player $player_char controllable 
847E: not player $PLAYER_CHAR on_any_bike
84C9:   not player $PLAYER_CHAR in_flying_vehicle
816B:   not fading  
jf @BOMBVC_45


wait 300 


if and
00E1:  player 0 pressed_button 5
00E1:  player 0 pressed_button 7
then

else
    if and
    80E1:  not player 0 pressed_button 5
    80E1:  not player 0 pressed_button 7
    then
    
    else
        jump @BOMBVC_45 
    end
end


wait 0 
if and
   Player.Defined($PLAYER_CHAR)
   Actor.Driving($PLAYER_ACTOR)
00E1:   player 0 pressed_button 17
jf @BOMBVC_45


:BOMBVC_50
wait 0
if
80E1:  not player 0 pressed_button 17
jf @BOMBVC_50

//01B1: give_player $PLAYER_CHAR weapon 14 ammo 1 // Load the weapon model before using this 
000E: 8@ -= 1 // @ -= int
//01B1: give_player $PLAYER_CHAR weapon 5@ ammo 6@ // Load the weapon model before using this
   /*
04B8: get_weapon_data_from_actor $PLAYER_ACTOR slot 6 weapon 5@ ammo 6@ model 7@

if 
8039:  not 5@ == 0 // @ == int
then
      
        01B8: set_player $PLAYER_CHAR armed_weapon_to 5@
end */

Model.Load(270)

:BOMBVC_501
wait 0
if
0248:   model 270 available
jf @BOMBVC_501
038B: load_requested_models 

 
0@ = Actor.CurrentCar($PLAYER_ACTOR) 
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 -7.5 -0.5 
4@ = Object.Create(270, 1@, 2@, 3@)
Object.CollisionDetection(4@) = False
Object.ToggleInMovingList(4@) = False
wait 1500 
Object.CollisionDetection(4@) = True
Object.ToggleInMovingList(4@) = True

:BOMBVC_60
wait 0
if
03CA:   object 4@ exists
jf @BOMBVC_120
01BB: store_object 4@ position_to 1@ 2@ 3@
jf @BOMBVC_120
if
8366:   NOT object 4@ damaged
jf @BOMBVC_100

wait 1000 
:BOMBVC_100
01BB: store_object 4@ position_to 1@ 2@ 3@  
020C: create_explosion_with_radius 7 at 1@ 2@ 3@ 
020C: create_explosion_with_radius 7 at 1@ 2@ 3@
020C: create_explosion_with_radius 7 at 1@ 2@ 3@  

:BOMBVC_120
0249: release_model 270
Object.Destroy(4@)
wait 1000 
jump @BOMBVC_45

